export function dateTimeToString(date) {
  const y = date.getFullYear();
  const M = date.getMonth() + 1;
  const d = date.getDate();
  const H = date.getHours();
  const m = date.getMinutes();
  const s = date.getSeconds();
  return (
    y +
    "-" +
    (M < 10 ? "0" + M : M) +
    "-" +
    (d < 10 ? "0" + d : d) +
    " " +
    (H < 10 ? "0" + H : H) +
    ":" +
    (m < 10 ? "0" + m : m) +
    ":" +
    (s < 10 ? "0" + s : s)
  );
}
